1. Field of the Invention
The present invention relates to a storage controller which controls the distribution and storage of data and parities in a plurality of memory devices such as RAID (Redundant Array of Inexpensive Disks), and a method thereof.
2. Description of the Related Art
RAID is a technology wherein a plurality of hard disks are combined and controlled as one redundant hard disk and is classified into seven levels, from RAID 0 to RAID 6, according to the methods for data allocation to disks and data redundancy. Out of these levels, in RAID 3 to Raid 6, redundancy is realized by storing parities, which have been created from data, independently of the data (for example, refer to Japanese Patent Laid-Open Publication No. 2000-259359).
The mapping of RAID 5 is described first. In RAID 5, performance enhancement is achieved by changing the disk which handles parities, fixed in RAID 4, every time stripes change in order to distribute the parities. For example, in the case of a (4+1) RAID configuration, the allocation of one stripe by RAID 5 mapping is as shown in FIG. 1A. STORAGE CONTROLLER AND METHOD FOR STORAGE CONTROL
Here, an (N+1) RAID configuration indicates a configuration wherein the number of disks, N, out of (N+1) disks, handle data strips and one disk handles the parity strips. In the example in FIG. 1A, one stripe comprises data D00 to D03 which are each allocated to four disks, Disk 0 to Disk 3, and parity P00 which is allocated to Disk 4. Data D00 to D03 are arranged and allocated in sequential order of the subscripts starting from D00.
A conventional read process for reading data stored as such does not require parity P00. Therefore, Disk 4, to which the parity is allocated, is not used for read requests for D00 to D03.
If a plurality of stripes is stored in Disk 0 to Disk 4, a read request wherein data which span different stripes is read in sequential order of the subscripts may also be considered. When taking into consideration performance in a sequential read process such as this, it is effective to allocate data D04, which is the head of the next stripe, to Disk 4, to which Parity P00 had been allocated in the previous stripe and to which no access has been made. For example, if the positions of the head data in each stripe are each shifted with every stripe, the allocation of data and parities are as shown in FIG. 1B.
The mappings of data and parities are generally performed in an (N+1)-stripe cycle, corresponding to the (N+1) RAID configuration. Since N=4 here, it is a 5-stripe cycle.
The mapping of RAID 6 is described next. RAID 6 is a RAID level which addresses the failure of a plurality of disks. RAID 6 is indicated by an (N+M) RAID configuration and holds the parity with each stripe, as in RAID 5. Since the M number of disks to which parities are allocated corresponds to the failure of a plurality of disks, it is two or more. Parity P, which is equivalent to RAID 5, and parities Q, R, S, and the like, which differ from parity P, are generally used as these parities.
In the following explanation, in order to address the failure of two disks, the parity P and parity Q are used, with M=2.
If the mapping of RAID 5 shown in FIG. 1B is applied to the (4+2) RAID configuration in RAID 6, the allocation of data and parities are as shown in FIG. 1C. Generally, this is the allocation in the (N+M) stripe cycle, and all of the disks handle both parity P and parity Q.
The mapping of a conventional RAID 6, described above, has the following problem.
In the mapping of RAID 6 shown in FIG. 1C, the same disk handles parity P and parity Q in two consecutive stripes and does not handle data. This is not desirable from the viewpoint of sequential read performance.